<template>
  <view class="container">
    <uni-section class="mb-10 content" title="需要帮助请联系我们" type="line">
      <uni-list>
        <uni-list-item
          v-for="(item, index) in list"
          :key="index"
          :title="item.title"
          :note="item.note"
          @tap="copyNote(item.note)"
        ></uni-list-item>
      </uni-list>
    </uni-section>
  </view>
</template>

<script lang="ts" setup>
import { reactive } from "vue";

const list = reactive([
  {
    title: "应用负责人联系方式：",
    note: "18316192775",
  },
  { title: "应用负责人邮箱：", note: "kimhi_954@163.com" },
]);

const copyNote = (note: string) => {
  uni.setClipboardData({
    data: note,
    success: () => {
      uni.showToast({
        title: "已复制",
        icon: "success",
      });
    },
  });
};
</script>

<style scoped lang="scss">
.container {
  box-sizing: border-box;
  border-radius: 15rpx;
  margin: 10rpx;
  overflow: hidden;

  .content {
    border-radius: 15rpx;
  }
}
</style>
